package com.by.controller;

import com.by.core.bean.ResultBean;
import com.by.core.controller.BaseController;
import com.by.entity.Order;
import com.by.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api")
public class OrderController extends BaseController {
    @Autowired
    OrderService orderService;
    @GetMapping("/order")
    public ResultBean query(int id){
        Order order = orderService.getById(id);
        return success("ok",order);
    }
}
